package com.kin207.netty.tcp;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.kin207.netty.session.SessionManager;

import io.netty.channel.ChannelHandlerContext;

public class TcpSessionManager extends SessionManager {
	final static Logger logger = LoggerFactory.getLogger(TcpSessionManager.class);
	
	public int sendMessage(ChannelHandlerContext ctx, String msg){
		logger.error("send message, address:{}, message:{}", ctx.channel().remoteAddress(), msg);
		ctx.write(msg);
		ctx.writeAndFlush(messageEnd);
		return 0;
	}
}
